/**
 * 
 */
package info.pello.struts.tulebox.example;

/**
 * Action Class for Orchis or Elvish names
 * @author Raquel Valenzuela Ganuza
 *
 */
public class NameAction extends ExampleSupport{
	private Integer syllables;
	private String language;
	private String result;
	
	/**
	 * execute method
	 */
	public String execute() throws Exception {
    	Name name= new Name(syllables, language);
    	
    	result= name.generateName();
        return SUCCESS;
    }

    
	/* (non-Javadoc)
	 * @see com.opensymphony.xwork2.ActionSupport#input()
	 */
	@Override
	public String input() throws Exception {
		// TODO Auto-generated method stub
		System.err.println("Input...");
		return super.input();
	}
	
	/**
	 * getSyllables
	 * @return Syllables of the name
	 */
	public int getSyllables() {
		return syllables;
	}
	
	/**
	 * setSyllabes
	 * @param syllables
	 */
	public void setSyllables(int syllables) {
		this.syllables = syllables;
	}
	
	/**
	 * getLanguage
	 * @return Language of the name
	 */
	public String getLanguage() {
		return language;
	}
	
	/**
	 * setLanguage
	 * @param language
	 */
	public void setLanguage(String language) {
		this.language = language;
	}
	
	/**
	 * getResult
	 * @return Result
	 */
	public String getResult() {
		return result;
	}
	
	/**
	 * setResult
	 * @param result
	 */
	public void setResult(String result) {
		this.result = result;
	}
	
	
}
